/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package org.ing.sisval.util;

import java.awt.Dimension;
import java.awt.Graphics;
import javax.swing.ImageIcon;
import javax.swing.JPanel;

/**
 *
 * @author Mysham
 */
public class UtilImagen extends JPanel{
    ImageIcon imagen;
    String nombre;

    public UtilImagen(String nombre) {
        this.nombre=nombre;
    }
    
    @Override
    public void paint(Graphics g){
        Dimension tamanio= getSize();
        imagen = new ImageIcon(getClass().getResource(nombre));
        g.drawImage(imagen.getImage(), 0, 0, tamanio.width, tamanio.height,null);
        setOpaque(false);
        super.paint(g);
    }
    
}
